package cn.z2huo.knowledge.basic.exception;

import lombok.extern.slf4j.Slf4j;

/**
 * <p>
 *
 * @author z2huo
 */
@Slf4j
class MultiTryCatchTest {

    static void method() {
        try {
            caclulation();
        } catch (Exception e) {
//            log.error(e.getMessage(), e);
//            log.error("除数不能为 0", e);
            throw new RuntimeException("除数不能为 0", e);
        }
    }

    static void caclulation() {
        int a = 1/0;
    }

    public static void main(String[] args) {
        try {
            method();
        } catch (Exception e) {
            log.error(e.getMessage(), e);
//            log.error("业务 method 异常", e);
//            throw new RuntimeException("业务 method 异常", e);
        }
    }

}
